package org.thanos.demo.message;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.thanos.demo.config.RabbitTopic;

@Component
@RabbitListener(queues = RabbitTopic.DEMO_TOPIC)
public class Consumer {

    private static final Logger LOGGER = LoggerFactory.getLogger(Consumer.class);

    @RabbitHandler
    public void process(String message) {
        LOGGER.info("Receive : {}.", message);
    }

}
